<?php
class RegisterController extends BaseController
{
	/**
	 * 展示注册页面
	 * @Author   Leikes
	 * @DateTime 2016-01-29T17:19:51+0800
	 * @return   view                   注册页面的视图
	 */
	public function showView()
	{
		$register=new RegisterService;
		$roles=$register->findAllRole();
		return View::make('user.register')->with(['roles'=>$roles]);
	}

	/**
	 * 接收注册 信息 
	 * @Author   Leikes
	 * @DateTime 2016-01-29T16:50:27+0800
	 * @return   json                   ['code','message']
	 */					
	public function receiveValue()
	{
		$data=Input::all();
		$register=new RegisterService;
		$errorInfo=$register->register($data);
		return Response::json($errorInfo);
	}


}
?>